<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>QIap: QIap Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.1 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="classes.html"><span>Class&nbsp;Index</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-slots">Public Slots</a> &#124;
<a href="#signals">Signals</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a>  </div>
  <div class="headertitle">
<h1>QIap Class Reference</h1>  </div>
</div>
<div class="contents">
<!-- doxytag: class="QIap" -->
<p>In App Purchase wrapper implementation for local stored content.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="qiap_8h_source.html">qiap.h</a>&gt;</code></p>

<p><a href="class_q_iap-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-slots"></a>
Public Slots</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a62ebd3ceb50cea19b3bf8c19566dfd27"></a><!-- doxytag: member="QIap::getProducts" ref="a62ebd3ceb50cea19b3bf8c19566dfd27" args="()" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_iap.html#a62ebd3ceb50cea19b3bf8c19566dfd27">getProducts</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get available IAP products on OVI Store. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0fd251c0a018960401bb5a925d1788e2"></a><!-- doxytag: member="QIap::restoreProducts" ref="a0fd251c0a018960401bb5a925d1788e2" args="()" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_iap.html#a0fd251c0a018960401bb5a925d1788e2">restoreProducts</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieve previously purchased products. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5ceb77a331ae37bc83663913e24c15d2"></a><!-- doxytag: member="QIap::resetPurchases" ref="a5ceb77a331ae37bc83663913e24c15d2" args="()" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_iap.html#a5ceb77a331ae37bc83663913e24c15d2">resetPurchases</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reset purchased products. <br/></td></tr>
<tr><td colspan="2"><h2><a name="signals"></a>
Signals</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0784a6a9f1312c3f3ffda0b64fde22e7"></a><!-- doxytag: member="QIap::purchaseCompleted" ref="a0784a6a9f1312c3f3ffda0b64fde22e7" args="(QString status, QString productID)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><b>purchaseCompleted</b> (QString status, QString productID)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa72e3bf7a28b21b64be1a2e50c002900"></a><!-- doxytag: member="QIap::purchaseFlowFinished" ref="aa72e3bf7a28b21b64be1a2e50c002900" args="(int requestId)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><b>purchaseFlowFinished</b> (int requestId)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac21cc8102061a419b0dc6546df151ae9"></a><!-- doxytag: member="QIap::getProductsCompleted" ref="ac21cc8102061a419b0dc6546df151ae9" args="()" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><b>getProductsCompleted</b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3b01828b3a7c7be891ad910329b6bc5e"></a><!-- doxytag: member="QIap::restoreProductsCompleted" ref="a3b01828b3a7c7be891ad910329b6bc5e" args="()" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><b>restoreProductsCompleted</b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a15fe5dead6fecf48b7a71ab7fc5a7d41"></a><!-- doxytag: member="QIap::itemRestored" ref="a15fe5dead6fecf48b7a71ab7fc5a7d41" args="(QString productID)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><b>itemRestored</b> (QString productID)</td></tr>
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_iap.html#abd5d1ef5174f381cf44bb79c1bac69d1">QIap</a> (QObject *parent=0)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor.  <a href="#abd5d1ef5174f381cf44bb79c1bac69d1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2416f05f5aaf59e04e836ea5d71368ec"></a><!-- doxytag: member="QIap::~QIap" ref="a2416f05f5aaf59e04e836ea5d71368ec" args="()" -->
virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_iap.html#a2416f05f5aaf59e04e836ea5d71368ec">~QIap</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aec4845db432bac8b071486b286bcf57c"></a><!-- doxytag: member="QIap::availableProducts" ref="aec4845db432bac8b071486b286bcf57c" args="()" -->
QList<br class="typebreak"/>
&lt; IAPClient::ProductDataHash &gt; &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_iap.html#aec4845db432bac8b071486b286bcf57c">availableProducts</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">List of available IAP products on OVI Store. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Q_INVOKABLE int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_iap.html#a6d5dfcf16e7aa58a3de1505075f88caf">purchaseProductByID</a> (QString productId, IAPClient::ForceRestorationFlag restoration=IAPClient::ForcedAutomaticRestoration)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Purchase a product by In-app ID.  <a href="#a6d5dfcf16e7aa58a3de1505075f88caf"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Q_INVOKABLE int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_iap.html#ada07f221851987bc10de4600150cb8fb">purchaseProductByName</a> (QString productName, IAPClient::ForceRestorationFlag restoration=IAPClient::ForcedAutomaticRestoration)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Purchase a product by product name ( info field ).  <a href="#ada07f221851987bc10de4600150cb8fb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Q_INVOKABLE bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_iap.html#aa7410a58c089c6dceb1671ea2db1833d">isPurchased</a> (QString fileName)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Q_INVOKABLE QByteArray&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_iap.html#a83948f56a2182dffcf034bd3e058a50f">getDRMFileContent</a> (QString productID, QString fileName)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get DRM file content if the device can access the encrypted file.  <a href="#a83948f56a2182dffcf034bd3e058a50f"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_q_iap_private.html">QIapPrivate</a> *const&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_iap.html#a451411c2540d1659a1e353ce065acd91">d_ptr</a></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>In App Purchase wrapper implementation for local stored content. </p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="abd5d1ef5174f381cf44bb79c1bac69d1"></a><!-- doxytag: member="QIap::QIap" ref="abd5d1ef5174f381cf44bb79c1bac69d1" args="(QObject *parent=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QIap::QIap </td>
          <td>(</td>
          <td class="paramtype">QObject *&nbsp;</td>
          <td class="paramname"> <em>parent</em> = <code>0</code></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [explicit]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Constructor. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>parent</em>&nbsp;</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a83948f56a2182dffcf034bd3e058a50f"></a><!-- doxytag: member="QIap::getDRMFileContent" ref="a83948f56a2182dffcf034bd3e058a50f" args="(QString productID, QString fileName)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QByteArray QIap::getDRMFileContent </td>
          <td>(</td>
          <td class="paramtype">QString&nbsp;</td>
          <td class="paramname"> <em>productID</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QString&nbsp;</td>
          <td class="paramname"> <em>fileName</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get DRM file content if the device can access the encrypted file. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>productID</em>&nbsp;</td><td></td></tr>
    <tr><td valign="top"></td><td valign="top"><em>fileName</em>&nbsp;</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aa7410a58c089c6dceb1671ea2db1833d"></a><!-- doxytag: member="QIap::isPurchased" ref="aa7410a58c089c6dceb1671ea2db1833d" args="(QString fileName)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool QIap::isPurchased </td>
          <td>(</td>
          <td class="paramtype">QString&nbsp;</td>
          <td class="paramname"> <em>fileName</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>fileName</em>&nbsp;</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if file is purchased </dd></dl>

</div>
</div>
<a class="anchor" id="a6d5dfcf16e7aa58a3de1505075f88caf"></a><!-- doxytag: member="QIap::purchaseProductByID" ref="a6d5dfcf16e7aa58a3de1505075f88caf" args="(QString productId, IAPClient::ForceRestorationFlag restoration=IAPClient::ForcedAutomaticRestoration)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int QIap::purchaseProductByID </td>
          <td>(</td>
          <td class="paramtype">QString&nbsp;</td>
          <td class="paramname"> <em>productId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">IAPClient::ForceRestorationFlag&nbsp;</td>
          <td class="paramname"> <em>restoration</em> = <code>IAPClient::ForcedAutomaticRestoration</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Purchase a product by In-app ID. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>productId</em>&nbsp;</td><td></td></tr>
    <tr><td valign="top"></td><td valign="top"><em>restoration</em>&nbsp;</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ada07f221851987bc10de4600150cb8fb"></a><!-- doxytag: member="QIap::purchaseProductByName" ref="ada07f221851987bc10de4600150cb8fb" args="(QString productName, IAPClient::ForceRestorationFlag restoration=IAPClient::ForcedAutomaticRestoration)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int QIap::purchaseProductByName </td>
          <td>(</td>
          <td class="paramtype">QString&nbsp;</td>
          <td class="paramname"> <em>productName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">IAPClient::ForceRestorationFlag&nbsp;</td>
          <td class="paramname"> <em>restoration</em> = <code>IAPClient::ForcedAutomaticRestoration</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Purchase a product by product name ( info field ). </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>productName</em>&nbsp;</td><td></td></tr>
    <tr><td valign="top"></td><td valign="top"><em>restoration</em>&nbsp;</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a451411c2540d1659a1e353ce065acd91"></a><!-- doxytag: member="QIap::d_ptr" ref="a451411c2540d1659a1e353ce065acd91" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_q_iap_private.html">QIapPrivate</a>* const <a class="el" href="class_q_iap.html#a451411c2540d1659a1e353ce065acd91">QIap::d_ptr</a><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Private implementation of the API </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="qiap_8h_source.html">qiap.h</a></li>
<li>qiap.cpp</li>
</ul>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 26 2012 12:42:07 for QIap by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>
